home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1990 June
/
1990-06.d64
/
bas_beg 1
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
988b
|
29 lines
10 poke 53280,0:poke 53281,0:print chr$(147):bt=100:fl=1:i=1:l=39
20 rn=rnd(-ti/101)
30 c$=chr$(18)+chr$(160)
40 input "how many bars (max. 15)";nb:if nb<1 or nb>15 then print"[145][145][145]":goto40
50 print "[147]press space bar when you see something."
60 print "number at end of bar is reaction time":print "in seconds. ";
70 if gl=0 then gl=1:print "press space bar to start.";:goto 90
80 print "press space bar to start again."
90 get a$:if a$<>" " then 90
100 print chr$(147):for u=1 to int(800*rnd(1))+30:next:poke 198,0:print "";
110 print c$;:ti$="000000"
120 k=k+i:get a$:if a$<>" " then print c$;:if k<l then 120
130 if k=l then k=0:print:print "too late!":goto 230
140 j=ti:k=0
150 j=j/60:j=int(j*100+.5)/100:print j;:print
160 if peek(197)=60 then 160
170 poke 198,0:tl=tl+j
180 d=d+1:if d=nb then 240
190 if fl=0 then fl=1:print "";:goto 210
200 fl=0:print "[159]";
210 for u=1 to int(200*rnd(1))+20:get b$:if b$<>" " then next:goto 110
220 if b$=" " then print "too soon!
230 d[178]0:tl[178]0:fl[178]1:[137] 70
240 av[178]tl[173]d:av[178][181](av[172]100[170].5)[173]100
250 [153] "average reaction time ="av"sec."
260 [139] av[179]bt [167] [153] "best time ="av"sec.":bt[178]av:[137] 230
270 [153] "best time ="bt"sec."
280 [137] 230